package com.maowei.common;

/**
 * 常量类
 *
 * @author maowei
 * @date 2021/8/24
 */
public class CanalConstants {

    public static final String DEFAULT_HOST = "127.0.0.1";

    public static final int DEFAULT_PORT = 1111;

    public static final String DEFAULT_DESTINATION = "example";

    public static final String DEFAULT_USERNAME = "canal";

    public static final String DEFAULT_PASSWORD = "canal";

    public static final int DEFAULT_BATCHSIZE = 1000;

    public static final String DEFAULT_FILTER = ".*\\..*";

    public static final boolean DEFAULT_CUSTOM = true;

    public static final String UNITY_TABLE = "common_table";

    public static final String UNITY_SCHEMA = "common_table";
    /**
     * 解析相关常量
     */
    public static class Parser {

        //相关json key
        /**
         * 库名
         */
        public static final String SCHEMA_NAME = "schemaName";
        /**
         * 表名
         */
        public static final String TABLE_NAME = "tableName";
        /**
         * 事件类型
         */
        public static final String EVNENT_TYPE = "evenType";
        /**
         * 变化前的列
         */
        public static final String BEFORE_COLUMN = "beforeColumn";
        /**
         * 变化后的列
         */
        public static final String AFTER_COLUMN = "afterColumn";
        /**
         * 变化的列
         */
        public static final String CHANGED_COLUMN = "changedColumn";
        /**
         * 变化的列 - 前
         */
        public static final String CHANGED_COLUMN_BEFORE = "before";
        /**
         * 变化的列 - 后
         */
        public static final String CHANGED_COLUMN_AFTER = "after";
    }
}
